#include <iostream>
#include <algorithm>
using namespace std;

const int N = 110;
int a[N][N];
int n;

void out()
{
    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j <= n; ++j)
        {
            printf("%4d", a[i][j]);
        }
        puts("");
    }
    puts("");
}

int guass()
{
    int r, c;
    for (r = c = 0; c < n; ++c)
    {
        // 1. 先找到为该列为1的行
        int t = r;
        for (int i = r; i < n; ++i)
            if (a[i][c])
            {
                t = i;
                break;
            }
        if (a[t][c] == 0)
            continue;
        // 2. 将该行交换到第r列
        if (t != r)
            for (int i = c; i <= n; ++i)
                swap(a[t][i], a[r][i]);
        // 3. 将下面的行都变成0
        for (int i = r + 1; i < n; ++i)
            if (a[i][c])
                for (int j = c; j <= n; ++j)
                    a[i][j] ^= a[r][j];
        // 4. 转至下一行
        r++;
        // out();
    }
    // cout << r << endl;
    if (r < n)
    {
        for (int i = r; i < n; ++i)
            if (a[i][n])
                return 2;
        return 1;
    }
    for (int i = n - 1; i >= 0; --i)
        for (int j = i + 1; j < n; ++j)
            a[i][n] ^= a[i][j] & a[j][n];
    return 0;
}

int main()
{
    cin >> n;
    for (int i = 0; i < n; ++i)
        for (int j = 0; j <= n; ++j)
            cin >> a[i][j];
    int res = guass();
    if (res == 0)
        for (int i = 0; i < n; ++i)
            cout << a[i][n] << endl;
    else if (res == 1)
        cout << "Multiple sets of solutions\n";
    else
        cout << "No solution\n";
    return 0;
}